package com.jinghua.treatment.tools;

import java.io.IOException;
import java.util.Properties;

/**
 * Created by kriss on 2018/4/20 0028.
 */
public class PropertyUtil {

    static Properties properties;

    static {
        properties = new Properties();
        try {
            properties.load(PropertyUtil.class.getClassLoader().getResourceAsStream("config.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String getConfig(String key) {
        return properties.getProperty(key);
    }

    public static void main(String args[]) {
        System.out.println(getConfig("wechat.sercret"));
    }
}
